package com.victualler.product.customer.service;

import com.victualler.core.base.service.BaseService;
import com.victualler.product.customer.dto.CustomerInfoDto;
import com.victualler.product.customer.entity.CustomerAddressDao;
import com.victualler.product.customer.entity.CustomerDao;
import com.victualler.product.customer.repository.CustomerQueryRepository;
import com.victualler.product.customer.repository.CustomerRepository;


/**
 * @author: Guoshichang
 * @discription:
 */
public interface CustomerService extends BaseService<CustomerDao, CustomerRepository,CustomerQueryRepository>{

    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param id
     * @Function 根据id获取所有信息
     */
    public CustomerInfoDto findInfoDto(Long id);

    /**
     * @author Guoshichang
     * @since 13:58 on 2019/1/16.
     * @param openId 微信对应的id号
     * @return  对应的客户详细信息
     * @Function 根据微信唯一标识确定
     */
    public CustomerInfoDto findInfoDtoByOpenId(String openId);

    /**
     * @author Guoshichang
     * @since 13:58 on 2019/1/16.
     * @return  对应的客户详细信息
     * @Function 根据微信唯一标识确定
     */
    public CustomerInfoDto bindCustomerByWeiXin(CustomerDao customerDao);


    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param customerInfoDto 全部信息
     * @Function 保存大对象
     */
    public void saveInfo(CustomerInfoDto customerInfoDto);

    /**
     * @author Guoshichang   
     * @since 12:42 on 2019/1/18.
     * @param name name
     * @return 
     * @Function  根据地址信息更新地址
     */
    public CustomerAddressDao updateAddress(String name , String phone, String address, Long customerId);
}
